package com.acme.task5;

public class TextModifier {
	static final String MES_EMPTY_ARGS = "Empty argument list";
	
	public static void main(String[] args) {
		if (args.length == 0) {
			System.out.println(MES_EMPTY_ARGS);
			return;
		}
		
		String str = args[0];
		printStringWithoutNumbersAndWithDoubleSigns(str);
	}
	
	static void printStringWithoutNumbersAndWithDoubleSigns(String str) {
		for (int i = 0; i < str.length(); i++) {
			char charAtIndex = str.charAt(i);

			if (!Character.isDigit(charAtIndex)) {
				if (charAtIndex == '+' || charAtIndex == '-') {
					System.out.print(charAtIndex);
				}
				System.out.print(charAtIndex);
			}
		}
		System.out.println();
	}
}
